package com.installtime.demo.controller;

import com.installtime.demo.model.Result;
import com.installtime.demo.model.User;
import com.jfinal.core.Controller;
import com.jfinal.plugin.activerecord.Page;

import java.util.List;

/**
 * @Classname UserController
 * @Description TODO
 * @Date 6/29/2020 1:31 PM
 * @Created by W.Z
 */
public class UserController extends Controller {

    public void pageUsers(User user){
        String name = getPara("name");
        Page<User> paginate = User.dao.paginate(1, 10, "select *", "from t_user where deleted=0");
        renderJson(Result.ok(paginate));
    }
}
